
public class ProductorConsumidor {

	static Buffer buffer = new Buffer(3);

	public static void main(String[] args) {
		for (int i = 1; i <= 5; i++) {
			Productor a = new Productor(buffer, i);
			Thread P=new Thread(a);
			P.start();
		}
		for (int j = 1; j <= 5; j++) {
			Consumidor a = new Consumidor(buffer, j);
			Thread C=new Thread(a);
			C.start();
		}
		System.out.println("Fin del hilo main.");
	}
}
